<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8" import="user.User"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<script type="text/javascript" src="http://lib.sinaapp.com/js/jquery/2.2.4/jquery-2.2.4.min.js"></script>
</head>
<script type="text/javascript">
$(function () {
	/*隐藏所有的子标题*/
	$(".nav-menu").each(function name() {
		$(this).children(".nav-content").hide();
	});
	
	/*给所有菜单项的主标题绑定时间*/
	$(".nav-title").each(function() {
		$(this).click(function() {
			
			//当点击标题时，子标题区展示出来
			//获取当前点击主标题下的子标题区
			var navConEle=$(this).parents(".nav-menu").children(".nav-content");
			//判断navConEle的display属性值是否为none
			if(navConEle.css("display")!="none"){
				//隐藏
				navConEle.hide(500);//单位毫秒
			}else{
				/*
					当要展开摸一个子标题列表时，其他所有的子标题列表关闭
				*/
				var navEle=navConEle.parents(".nav-menu");
				
				var menuEle=navEle.siblings();
				menuEle.each(function() {
					$(this).children(".nav-content").hide(500);
				})
				//展开
				navConEle.show(500);
			}
			
		});
	});
});



</script>

<style type="text/css">
*{
	padding: 0;
	margin: 0;
}
.content-left{
	width: 100%;
	height: 650px;
	background-image: url(../images/1.png);
	background-repeat: no-repeat;
	background-size: cover;;
	float: left;
}

.left-title{
	height: 50px;
	width: 100%;
}

.left-title>a{
	display: block;
	width: 100%;
	height: 50px;
	/*垂直居中*/
	line-height: 50px;
	/*水平居中*/
	text-align: center;
	/*字体颜色*/
	color: #fff;
	/*去掉a标签默认的下划线*/
	text-decoration: none;
} 

.seg{
	height: 1px;
	width: 100%;
	background-color: black;
}
.nav{
	margin: 5px 0;
}

.nav-title{
	height: 40px;
	width: 100%;
	color: #fff;
	/*水平居中*/
	text-align: center;
	/*垂直居中*/
	line-height: 40px;
	/*当鼠标滑过主标题时显示手型*/
	cursor: pointer;
}

.nav-content{
	width: 100%;
	height: 100%;
	background-image: url(../images/1.png);
	background-repeat: no-repeat;
	background-size: cover;;
}

.nav-content>a{
	display: block;
	height: 30px;
	width: 100%;
	color: #CCCCCC;
	text-decoration: none;
	text-align: center;
	line-height: 30px;
	font-size: 14px;
}

.nav-content>a:HOVER{
	display: block;
	height: 30px;
	width: 100%;
	color: #FFFFFF;
	text-decoration: none;
	text-align: center;
	line-height: 30px;
	background-color: #12040C;
}
img{
	width: 80px;
	height: 80px;
	display: flex;
	border-radius: 50%;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	margin: 60px 60px 60px 90px;
}
</style>
<body>

<div class="content-left">
	<div><img alt="" src="../images/1.png"></div>
	<div class="left-title">
	<a href="#">操作菜单</a>
	</div>
	<div class="seg"></div>
	<div class="nav">
		<div class="nav-menu">
		<div class="nav-title">用户管理</div>
		<div class="nav-content">
<%
User user=(User)session.getAttribute("user");
if(user.getType()==1){
%>
					<a href="../user/user_select.jsp" target="content">用户查询</a>
<%
}
%>
					<a href="../User_select_pesson?uid=<%=user.getUid() %>" target="content">个人信息</a>
			</div>
		</div>
		
		<div class="nav-menu">
		<div class="nav-title">信息管理</div>
		<div class="nav-content">
			<a href="../user/user_pass_update.jsp?uid=<%=user.getUid() %>" target="content">修改密码</a><br>
			<a href="../User_Modify_select?uid=<%=user.getUid()%>" target="content">修改个人信息</a>
		</div>
		</div>
		<div class="nav-menu">
		<div class="nav-title">新闻管理</div>
		<div class="nav-content">
		<%
        if(user.getType()==1){
              %>
					<a href="../news/news_management.jsp" target="content">新闻审核</a>
                 <%
             }
              %>
	    <div class="nav-content">
	    <% if(user.getType() == 0){ %>
	    <a href="../news/news_release.jsp"target="content">发布新闻</a><br>
	    <a href="../news/news_list.jsp"target="content">新闻列表</a><br>
		<%
	    } 
	    %>
			</div>
			</div>
		</div>
		<div class="nav-menu">
		<div class="nav-title"><a href="../user/exit.jsp" target="_top" style="text-decoration: none;color: #fff">退出系统</a></div>
		</div>
	</div>
	<div class="seg"></div>
</div>
</body>
</html>